	   .MODEL FLAT,C
.DATA
 GA_SPACE EQU 22
 N=5
.CODE
RECOMMEND_INDEX PROC FAR STDCALL USES EAX EBX ECX EDX ESI PRO:DWORD
       MOV EBX,PRO
	;   MOV ECX,22
	;  LCHECK:
	;   MOV AH,[EBX]
	;   INC EBX
	;   LOOP LCHECK
	;   INC EBX
	   MOVZX EAX,WORD PTR[EBX+12]
	   MOV ECX,1000
	   MUL ECX
	   MOVZX ECX,WORD PTR[EBX+10]
	   AND ECX,0FFH
	   CMP ECX,0
	   JA CONTINUE1
	   MOV WORD PTR [EBX+20],101
	   RET
CONTINUE1:	   
	   DIV ECX
	   MOV CX,[EBX+14]
	   CDQ
	   DIV ECX
	   MOV ESI, EAX
	   MOV ECX,50
	   MOVZX EAX,WORD PTR[EBX+18]
	   MUL ECX
	   MOVZX ECX,WORD PTR[EBX+16]
	   CMP ECX,0
	   JA CONTINUE2
	   MOV WORD PTR [EBX+20],0
       RET	   
CONTINUE2:
       CDQ
	   DIV ECX
	   MOV ECX,ESI
	   ADD EAX,ECX
	   SAL EAX,7
	   MOV ECX,100
	   CDQ
	   DIV ECX
	   MOV [EBX+20],AX
	   RET
RECOMMEND_INDEX ENDP

Recommend_All_Index PROC
       PUSH EBP
	   MOV EBP,ESP
       MOV ECX,N
	   MOV EBX,[EBP+8]
LOOP_RECOMMEND_ALL_INDEX:
	   INVOKE RECOMMEND_INDEX,EBX
	   ADD EBX,GA_SPACE
	   LOOP LOOP_RECOMMEND_ALL_INDEX
	   POP EBP
	   RET
Recommend_All_Index ENDP
END
